<?php

/* Web Statistics and Analytics Console (PHP)
 *  user.php
 *  Author: Trevor Bidyk
 *  Created: January 1, 2000
 *  Last modified: April 2, 2011
 *   (C) Us 2011
 *   Uses Simple PHP Framework, licensed under the FreeBSD license.
 *    View license in ./include/LICENSE.
 *   All rights reserved.
 */
require_once('includes/master.inc.php');
require_once('./functions.statistics.php');

if (isset($_GET['do'])) {
    if ($_GET['do'] == "login") {
        require_once("./subpages/user/login.php");
    } else if ($_GET['do'] == "logout") {
        if ($Auth->loggedIn()) {
            $Auth->logout();
            redirect('./index.php');
            exit;
        }
    } else {
        require_once("./subpages/user/login.php");
    }
} else {
    require_once("./subpages/user/login.php");
}
?>